package br.com.ozsolucoes.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class ServicoCategoriaPK implements Serializable {

	private static final long serialVersionUID = -5888889038895220421L;

	@Column(name = "idServico")
	private long idServico;

	@Column(name = "idCategoria")
	private long idCategoria;

	public ServicoCategoriaPK() {
		super();
	}

	public long getIdServico() {
		return idServico;
	}

	public void setIdServico(long idServico) {
		this.idServico = idServico;
	}

	public long getIdCategoria() {
		return idCategoria;
	}

	public void setIdCategoria(long idCategoria) {
		this.idCategoria = idCategoria;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (idCategoria ^ (idCategoria >>> 32));
		result = prime * result + (int) (idServico ^ (idServico >>> 32));
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ServicoCategoriaPK other = (ServicoCategoriaPK) obj;
		if (idCategoria != other.idCategoria)
			return false;
		if (idServico != other.idServico)
			return false;
		return true;
	}

}
